home *** CD-ROM | disk | FTP | other *** search
- property pCsn, pMb0, pMb1, pMb2, pAlt, pSB, pB
-
- on getPropertyDescriptionList
- description = [:]
- addProp(description, #pB, [#default: "Installer", #format: #string, #comment: "Bouton :", #range: ["Installer", "Services"]])
- return description
- end
-
- on mouseEnter me
- if pCsn <> VOID then
- if not soundBusy(2) then
- case pB of
- "Installer":
- vS = "BIns1h"
- vB = "instal3"
- "Services":
- vS = "Bserv1f"
- vB = "BtSac3"
- end case
- puppetSound(2, vS)
- sprite(pCsn).member = member(vB)
- updateStage()
- pSB = 1
- pAlt = 0
- else
- if pAlt then
- sprite(pCsn).member = pMb1
- end if
- end if
- cursor(280)
- else
- initBouton012()
- end if
- end
-
- on mouseDown me
- if pCsn <> VOID then
- if pAlt then
- sprite(pCsn).member = pMb2
- end if
- cursor(290)
- else
- initBouton012()
- end if
- end
-
- on mouseUp me
- if pCsn <> VOID then
- if pAlt then
- sprite(pCsn).member = pMb1
- end if
- cursor(280)
- else
- initBouton012()
- end if
- end
-
- on mouseWithin me
- if pCsn <> VOID then
- if pAlt then
- sprite(pCsn).member = pMb1
- end if
- cursor(280)
- else
- initBouton012()
- end if
- end
-
- on mouseLeave me
- if pCsn <> VOID then
- if pAlt then
- sprite(pCsn).member = pMb0
- end if
- cursor(-1)
- else
- initBouton012()
- end if
- end
-
- on exitFrame me
- if pSB <> VOID then
- if pSB then
- case pB of
- "Installer":
- vS = "BIns1h"
- vB = "instal0"
- "Services":
- vS = "Bserv1f"
- vB = "BtSac0"
- end case
- if soundBusy(2) then
- if sound(2).member.name <> vS then
- pSB = 0
- pAlt = 1
- sprite(pCsn).member = member(vB)
- updateStage()
- end if
- else
- puppetSound(2, 0)
- pSB = 0
- pAlt = 1
- sprite(pCsn).member = member(vB)
- updateStage()
- end if
- end if
- end if
- end
-
- on initBouton012
- pCsn = the currentSpriteNum
- vName = sprite(pCsn).member.name
- if the last char in vName = "0" then
- delete char -30000 of vName
- pMb0 = vName & "0"
- pMb1 = vName & "1"
- pMb2 = vName & "2"
- pAlt = 1
- else
- pAlt = 0
- end if
- end
-